<#include "header.html">
<script type="text/javascript" src="js/md5.js"></script>
<script type="text/javascript">
function submitFn() {
	//enCodePassword();
	var password = $("#password").val();
	var confirmPwd = $("#confirmPwd").val();
	$("#password").val(JFT.encrypt(password));
	$("#confirmPwd").val(JFT.encrypt(confirmPwd));
	var param = "password="+JFT.encrypt(password)+"&confirmPwd="+JFT.encrypt(confirmPwd) + "&adminId=" + $("#adminId").val();
	beginPageLoading();
	ajaxPost("changePassAction.do?method=save", param, function(data){
		endPageLoading();
		if(data["resultCode"] == 0){
			alert("密码修改成功，请重新登录！");
			top.location.href = "loginAction.do?method=logout";
		} else if(data["resultCode"] == 1) {
			alert(data["resultMsg"]);
			return;
		}
	});
}
</script>
<div class="c_nav">
	<span>管理选项：</span>
	<a href="javascript:location.reload()">[刷新页面]</a>
</div>
<div class="c_box bg_white">
	<form target="_top" id="adminForm" name="adminForm" action="" method="post">
	<div class="c_topic">修改【${admin.adminUser!}】密码</div>
	<div class="c_form_3 c_form-label-6">
		<ul class="l_mb">
			<li>
				<span class="e_label e_label-required">登录账号：</span>
				<span class="e_input">
					<input type="text" name="adminUser" id="adminUser" desc="登录账号" nullable="no" datatype="mixchar" minlen="5" maxlen="20" maxlength="20" value="${admin.adminUser!}" readonly="readonly"/>
				</span>
			</li>
		</ul>
		<ul class="l_mb">
			<li>
				<span class="e_label e_label-required">登录密码：</span>
				<span class="e_input">
					<input type="password" name="password" id="password" desc="登录密码" nullable="no" datatype="strongchar" minlen="5" maxlen="20" maxlength="20" value=""/>
				</span>
			</li>
		</ul>
		<ul class="l_mb">
			<li>
				<span class="e_label e_label-required">确认密码：</span>
				<span class="e_input">
					<input type="password" name="confirmPwd" id="confirmPwd" desc="确认密码" nullable="no" equal="password" minlen="5" maxlen="20" maxlength="20" value=""/>
				</span>
			</li>
		</ul>
	</div>
	<div class="e_center">
		<input type="hidden" name="adminId" id="adminId" value="${admin.id!}"/>
		<button type="button" class="e_btn l_ml" onclick="submitFn()" >提交</button>
		<button type="reset" class="e_btn l_ml">重置</button>
	</div>
    </form>
</div>
<#include "footer.html">